<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="LightYear,LightYearAdmin,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="Light Year Admin V5是一个基于Bootstrap v5.1.3的后台管理系统的HTML模板。">
<title>文档列表 - 光年(Light Year Admin V5)后台管理系统模板</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/css/style.min.css">

<link rel="stylesheet" type="text/css" href="__STATIC__/common/cch.css">
</head>
  
<body>
<div class="container-fluid">
  
  <div class="row">
    
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          <div class="card-search mb-2-5">
            <form class="search-form" method="get" action="{:url('index')}" >
              
              {include file="html/search" /}
              
            </form>
          </div>
          <div class="card-btns mb-2-5">
            <a class="btn btn-primary me-1 search_btn" href="#!"><i class="mdi mdi-magnify"></i> 搜索</a>
            <a class="btn btn-success me-1" href="{:url('add',['company_id'=>input('company_id',0),'department_id'=>input('department_id',0)])}"><i class="mdi mdi-plus"></i> 新增</a>
            <a class="btn btn-danger more_delete_btn" href="#!" data-url='{:url("moreDelete",[],"")}'><i class="mdi mdi-window-close"></i> 删除</a>
          </div>
          <div class="table-responsive">
            <table class="table table-bordered">
              <thead>
                <tr>
                  <th>
                    <div class="form-check">
                      <input class="form-check-input" type="checkbox" id="check-all">
                      <label class="form-check-label" for="check-all"></label>
                    </div>
                  </th>
                  <th>公司名称</th>
                  <th>部门名称</th>
                  <th>用户名</th>
                  <th>角色</th>
                  <th>姓名</th>
                  <th>手机号码</th>
                  <th>创建时间</th>
                  <th>最后登录时间</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                <?php if (empty($list['data'])): ?>
                  <tr><td colspan="100" class="text-center">暂无数据</td></tr>
                <?php else: ?>
                  <?php foreach ($list['data'] as $k => $vo): ?>
                    <tr>
                      <td>
                        <div class="form-check">
                          <input type="checkbox" class="form-check-input ids" name="ids[]" value="{:$vo['id']}" id="ids-{:$vo['id']}">
                          <label class="form-check-label" for="ids-{:$vo['id']}"></label>
                        </div>
                      </td>
                      <td>{:$vo['company']['name']}</td>
                      <td>{:$vo['department']['name']}</td>
                      <td>{:$vo['account']}</td>
                      <td>{:implode(',',$vo['role'])}</td>
                      <td>{:$vo['truename']}</td>
                      <td>{:$vo['mobile']}</td>
                      <td>{:timeDef($vo['ctime'])}</td>
                      <td>{:timeDef($vo['login_time'])}</td>
                      <td>
                        <div class="btn-group btn-group-sm">
                          <a class="btn btn-default" href="{:url('edit',['id'=>$vo['id']])}" data-bs-toggle="tooltip" title="编辑"><i class="mdi mdi-pencil"></i></a>
                          <a class="btn btn-default" href="{:url('admin_info/save',['admin_id'=>$vo['id']])}" data-bs-toggle="tooltip" title="信息"><i class="mdi mdi-book-education-outline"></i></a>
                          <a class="btn btn-default delete_btn" href="{:url('delete',['id'=>$vo['id']])}" data-bs-toggle="tooltip" title="删除"><i class="mdi mdi-delete"></i></a>
                        </div>
                      </td>
                    </tr>
                  <?php endforeach ?>
                <?php endif ?>
              </tbody>
            </table>
          </div>

          {$page|raw}
          
          
        </div>
      </div>
    </div>
        
  </div>
  
</div>


<script type="text/javascript" src="__STATIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/popper.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/main.min.js"></script>
<!--wps office-->
<script type="text/javascript" src="__STATIC__/common/web-office-sdk/web-office-sdk-solution-v2.0.2.umd.js"></script>
<!--自定义扩展-->
<script type="text/javascript" src="__STATIC__/common/cch.js"></script>
</body>
<script type="text/javascript">
  window.onload = () => {
    const instance = WebOfficeSDK.init({
      officeType: WebOfficeSDK.OfficeType.Writer,
      appId: 'SX20230717JYIWYM',
      fileId: '{:uuidCreate()}',
      // officeType:'w',
      // token:'12345678'
    })
  }

  // const startup = async () => {
  //   const timeout = 10 * 60 * 1000
  //   const [appId, fileId] = ['SX20230717JYIWYM', '{:uuidCreate()}']
  //   const token = '12345678'

  //   const instance = WebOfficeSDK.init({
  //     officeType: WebOfficeSDK.OfficeType.Writer,
  //     appId,
  //     fileId,
  //     fileToken: {
  //       token,
  //       timeout,
  //     },
  //     refreshToken: () => {
  //       return new Promise(resolve => {
  //         resolve({
  //           token,
  //           timeout,
  //         })
  //       })
  //     },
  //   })
  //   await instance.ready()
  // }

  // window.onload = async function () {
  //   startup()
  // }


</script>
</html>